/* 打卡拍照页面样式 */

/* 相机预览区域 */
.camera-preview {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #16a34a 100%);
    overflow: hidden;
}

/* 对焦框样式 */
.focus-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.focus-frame.active {
    border-color: #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* 相机控制按钮 */
.camera-control-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.camera-control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.camera-control-btn.active {
    background: #4ade80;
    border-color: #4ade80;
}

.camera-control-btn i {
    font-size: 16px;
    color: white;
}

/* 拍照模式按钮 */
.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.mode-btn.active {
    background: #dcfce7;
    border-color: #16a34a;
    color: #16a34a;
}

.mode-btn i {
    margin-bottom: 4px;
    font-size: 20px;
}

.mode-btn span {
    font-size: 12px;
    font-weight: 500;
}

/* 最近打卡照片 */
.recent-photo {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recent-photo:hover {
    transform: scale(1.05);
}

.recent-photo img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 8px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-overlay i {
    font-size: 12px;
}

.photo-overlay span {
    font-size: 10px;
    font-weight: 500;
}

/* 拍照按钮 */
.capture-btn {
    position: relative;
    width: 80px;
    height: 80px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.capture-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.capture-btn:active {
    transform: scale(0.95);
}

.capture-outer {
    width: 70px;
    height: 70px;
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.capture-inner {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.capture-btn:active .capture-inner {
    background: #dcfce7;
    transform: scale(0.9);
}

/* 相册按钮 */
.gallery-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.gallery-btn:hover {
    border-color: #16a34a;
    transform: scale(1.05);
}

.gallery-btn img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

/* 滤镜按钮 */
.filter-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.filter-btn:hover {
    border-color: #16a34a;
    color: #16a34a;
    transform: scale(1.05);
}

.filter-btn i {
    font-size: 20px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滤镜选项 */
.filter-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-option:hover {
    transform: scale(1.05);
}

.filter-option.active .filter-preview {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.filter-preview {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.filter-preview.vintage {
    background: linear-gradient(45deg, #8b4513, #daa520);
}

.filter-preview.warm {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

.filter-preview.cool {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.filter-preview.vivid {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.filter-preview.mono {
    background: linear-gradient(45deg, #2d3748, #4a5568);
}

.filter-option span {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.filter-option.active span {
    color: #16a34a;
    font-weight: 600;
}

/* 状态栏样式 */
.status-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* 底部导航 */
.fixed.bottom-0 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* 响应式设计 */
@media (max-height: 800px) {
    .camera-preview {
        height: 200px;
    }
    
    .mode-btn {
        padding: 8px 6px;
    }
    
    .capture-btn {
        width: 70px;
        height: 70px;
    }
    
    .capture-outer {
        width: 60px;
        height: 60px;
    }
    
    .capture-inner {
        width: 50px;
        height: 50px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 按钮点击效果 */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.95);
}

/* 特殊按钮样式 */
.camera-control-btn.active {
    background: #16a34a;
    border-color: #16a34a;
}

.camera-control-btn.active i {
    color: white;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1000;
    animation: successFade 2s ease-out forwards;
}

@keyframes successFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}